package com.hkemmm.cola;

public class SalesEmployee extends ColaEmployee{
    private int sales_mouth;        //月销售额
    private double rate;        //提成率

    public SalesEmployee(String name, int month, double rate) {
        super(name, month);
        this.sales_mouth = 0;
        this.rate = rate;
    }

    @Override
    public double getSalary(int month) {
        double n = 0;
        if(getMonth() == month){
            n = n + 100;
        }

        n = n + sales_mouth*rate;


        return n;
    }

    public int getSales_mouth() {
        return sales_mouth;
    }

    public void setSales_mouth(int sales_mouth) {
        this.sales_mouth = sales_mouth;
    }

    public double getRate() {
        return rate;
    }

    public void setRate(double rate) {
        this.rate = rate;
    }
}
